Should we represent objects that are containers for multiple primitive values , such as points , vectors , matrices , or rgb colors , with mutable or immutable objects 如果要表示的對(duì)象是多個(gè)基本值的容器(如:點(diǎn)、向量、矩陣或rgb顏色) ,是用可變對(duì)象還是用不變對(duì)象表示?
This is not bad for a class with multiple primitive and object reference fields . but for better insight , i must compare the result with other approaches below 對(duì)于擁有多個(gè)基本型別字段和對(duì)象引用字段的類別而言,這不算壞。然而為了更好的考究問題,我須將此結(jié)果與下面其它方案進(jìn)行比較才對(duì)。